import java.util.*;
import java.lang.Math;
class Person{
    private  String name;
    private  int age;

    public void eat(){
        System.out.println(age+name+"eating");
    }
    public Person(){
       // this("name",18);
    }
    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
public class practice2 {
    /*public static void main(String[] args) {  //二维数组行列表示 行i 列 arr[i]
        int[][] arr={{1,2},{3,4,5}};
        for (int i=0;i<arr.length;i++){
            for(int j=0;j<arr[i].length;j++){
                System.out.print(arr[i][j]+" ");
            }
            System.out.println(" ");
        }
    }*/
    //int a=199;默认权限 只能在此类使用，一般主类一个main的文件夹为主类，副类为自己创建的一个；
    public static void main(String[] args) {
        Person person = new Person("A", 18);
        //person.name="B";
        Person person2 = new Person();
        person.eat();
        System.out.println(person);
        // System.out.println(person2);
    }
}
